Learn R Programming

utils (version 3.4.0)

Rwin configuration: R for Windows Configuration

Description

The file Rconsole configures the R GUI console in this Windows port. The loadRconsole function loads a new configuration. The file Rdevga configures the graphics devices windows, win.graph, win.metafile and win.print, as well as the bitmap devices bmp, jpeg, png and tiff (which use for type = "windows" use windows internally).

Usage

loadRconsole(file)

Arguments

file
The file from which to load a new Rconsole configuration. By default a file dialog is used to select a file.

Value

Each of the files contains details in its comments of how to set the values. At the time of writing Rdevga configured the mapping of font numbers to fonts, and Rconsole configured the appearance (single or multiple document interface, toolbar, statusbar on MDI), size, font and colours of the GUI console, and whether resizing the console sets options("width"). The file Rconsole also configures the internal pager. This shares the font and colours of the console, but can be sized separately. Rconsole can also set the initial positions of the console and the graphics device, as well as the size and position of the MDI workspace in MDI mode. loadRconsole is called for its side effect of loading new defaults. It returns no useful value.

Chinese/Japanese/Korean

Users of these languages will need to select a suitable font for the console (perhaps MS Mincho) and for the graphics device (although the default Arial has many East Asian characters). It is essential that the font selected for the console has double-width East Asian characters -- many monospaced fonts do not.

Details

There are system copies of these files in R_HOME\etc. Users can have personal copies of the files: these are looked for in the location given by the environment variable R_USER. The system files are read only if a corresponding personal file is not found. If the environment variable R_USER is not set, the R system sets it to HOME if that is set (stripping any trailing slash), otherwise to the Windows ‘personal’ directory, otherwise to {HOMEDRIVE}{HOMEPATH} if HOMEDRIVE and HOMEDRIVE are both set otherwise to the working directory. This is as described in the file rw-FAQ.

See Also

windows

Examples

Run this code
ruser <- Sys.getenv("R_USER")
cat("\n\nLocation for personal configuration files is\n   R_USER = ",
    ruser, "\n\n", sep = "")
## see if there are personal configuration files
file.exists(file.path(ruser, c("Rconsole", "Rdevga")))

## show the configuration files used
showConfig <- function(file)
{
    ruser <- Sys.getenv("R_USER")
    path <- file.path(ruser, file)
    if(!file.exists(path)) path <- file.path(R.home(), "etc", file)
    file.show(path, header = path)
}
showConfig("Rconsole")

Run the code above in your browser using DataLab